package android.gpsmessenger;

public class Location 
{
	private double _latitude;	
	private double _longitude;
	
	public static double HARDCODE_LOCATION_LAT = 40.017624;
	public static double HARDCODE_LOCATION_LNG = -105.27966;

	// constructors
	public Location(double latitude, double longitude)
	{
		_latitude = latitude;		
		_longitude = longitude;
	}
	
	Location()
	{
		this(HARDCODE_LOCATION_LAT, HARDCODE_LOCATION_LNG);
	}
	
	public Location(Location location)
	{
		this(location.getLatitude(), location.getLongitude());
	}
	
	// getters
	public double getLatitude()
	{
		return _latitude;
	}
	
	public double getLongitude()
	{
		return _longitude;
	}
	
	// setters
	public void setLatitude(double latitude)
	{
		_latitude = latitude;
	}
	
	public void setLongitude(double longitude)
	{
		_longitude = longitude;
	}

	// other methods
	public String toString()
	{
		return "\n" + "Latitude: "  + _latitude +
			   "\n" + "Longitude: " + _longitude;
	}
		
	public boolean equals(Location location)
	{
	    if (_latitude == location.getLatitude() &&
	    		_longitude == location.getLongitude())
	        return true;
	    else
	        return false;
	}	
}
